<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>upload.html</title>
</head>
<body>
    <!--  上传文件的表单，method必须为post，并且必须指定enctype属性为multipart/form-data  -->
    <!--  enctype="multipart/form-data" 简单说明：让表单以二进制的形式传递数据，支持流文件类型  -->
    <form th:action="@{|/upload|}" target="curPage" method="post" enctype="multipart/form-data">
        姓名：<span th:text="${creditorInfo.realName}"></span><br/>
        性别：<span th:text="${creditorInfo.sex==1?'男':'女'}"></span><br/>
        电话：<span th:text="${creditorInfo.phone}"></span><br/>
        地址：<span th:text="${creditorInfo.address}"></span><br/>
        文件：<input type="file" name="myFile" /><br/>
        <input type="hidden" name="id" th:value="${creditorInfo.id}" /><br/>
        <input type="submit" value="上传文件"><br/>
    </form>

    <!--  嵌入式框架框架  -->
    <iframe name="curPage" style="display: none"></iframe>

</body>
</html>